TextView: Get line direction in more efficient way
authorDaniel Boles <dboles@src.gnome.org>
Sun, 26 Mar 2017 14:53:12 +0000 (15:53 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Sun, 26 Mar 2017 15:14:10 +0000 (16:14 +0100)
commitc78f6c804ee12a3064c74717f8d20df1bf666d18
treefba53fc9d759e268f6997c4e92910e5e359a1ec7
parent7be01e84c42c0b2d714b03d7095aa35dd5291fe3
TextView: Get line direction in more efficient way

We do not need to go through the heavyweight process of constructing a
TextLineDisplay just to get the direction out of it, when we can simply
use TextIter API to get the text and then get its direction using Pango.

Adapted from a patch by Mehdi Sadeghi for GtkSourceView:

https://bugzilla.gnome.org/show_bug.cgi?id=779081#c20
gtk/gtktextview.c